A commanding system allows a user's input to a computer system to be connected to an action performed by the computer in response to the input. One example of commanding is the connection of the input keystroke “ctrl-c” to the action of copying selected material to the clipboard. One existing commanding system is the Microsoft Foundation Class (MFC) Library. Commanding systems such as the MFC Library are implemented on an application-by-application basis. In other words, in existing commanding systems, commanding is handled by each application individually.
In addition, for a given application, commanding is handled on a device-dependent basis. In other words, in existing commanding systems, different sections of code are used to handle inputs based on the input device category (e.g., keyboard versus mouse versus menu) from which the input originates. For example, a specific section of code is used to connect an input sequence from a particular input device (e.g., a mouse) to a command handler that causes a specific action. However, a separate section of code is required to connect an input sequence from a different input device (e.g., a keyboard) to the specific action, even though the two inputs are used to invoke the same specific action.
Commanding has been structured such that different code sections handle the different inputs. Because different code sections are used, inconsistencies can result in how inputs across device categories are connected to actions.